package service

import (
	"context"
	"prombridge/internal/biz"

	pb "prombridge/api/prombridge/v1"
)

type AdminService struct {
	pb.UnimplementedAdminServer
	admin *biz.AdminRepo
}

func NewAdminService(a *biz.AdminRepo) *AdminService {
	return &AdminService{
		admin: a,
	}
}

func (s *AdminService) CleanAll(ctx context.Context, req *pb.CleanAllReq) (*pb.CleanAllReply, error) {
	s.admin.CleanAll()
	return &pb.CleanAllReply{}, nil
}
